Optimal. Leaf size=278 \[ \frac{\sqrt{a^2 c-b^2 c x^2} \left (A f^2-B e f+C e^2\right ) \tan ^{-1}\left (\frac{\sqrt{c} \left (a^2 f+b^2 e x\right )}{\sqrt{a^2 c-b^2 c x^2} \sqrt{b^2 e^2-a^2 f^2}}\right )}{\sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x} \sqrt{b^2 e^2-a^2 f^2}}-\frac{\sqrt{a^2 c-b^2 c x^2} (C e-B f) \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{b \sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{C \left (a^2-b^2 x^2\right )}{b^2 f \sqrt{a+b x} \sqrt{a c-b c x}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.464124, antiderivative size = 278, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 40, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.175, Rules used = {1610, 1654, 844, 217, 203, 725, 204} \[ \frac{\sqrt{a^2 c-b^2 c x^2} \left (A f^2-B e f+C e^2\right ) \tan ^{-1}\left (\frac{\sqrt{c} \left (a^2 f+b^2 e x\right )}{\sqrt{a^2 c-b^2 c x^2} \sqrt{b^2 e^2-a^2 f^2}}\right )}{\sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x} \sqrt{b^2 e^2-a^2 f^2}}-\frac{\sqrt{a^2 c-b^2 c x^2} (C e-B f) \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{b \sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{C \left (a^2-b^2 x^2\right )}{b^2 f \sqrt{a+b x} \sqrt{a c-b c x}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1610
Rule 1654
Rule 844
Rule 217
Rule 203
Rule 725
Rule 204
Rubi steps
\begin{align*} \int \frac{A+B x+C x^2}{\sqrt{a+b x} \sqrt{a c-b c x} (e+f x)} \, dx &=\frac{\sqrt{a^2 c-b^2 c x^2} \int \frac{A+B x+C x^2}{(e+f x) \sqrt{a^2 c-b^2 c x^2}} \, dx}{\sqrt{a+b x} \sqrt{a c-b c x}}\\ &=-\frac{C \left (a^2-b^2 x^2\right )}{b^2 f \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{\sqrt{a^2 c-b^2 c x^2} \int \frac{-A b^2 c f^2+b^2 c f (C e-B f) x}{(e+f x) \sqrt{a^2 c-b^2 c x^2}} \, dx}{b^2 c f^2 \sqrt{a+b x} \sqrt{a c-b c x}}\\ &=-\frac{C \left (a^2-b^2 x^2\right )}{b^2 f \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{\left ((C e-B f) \sqrt{a^2 c-b^2 c x^2}\right ) \int \frac{1}{\sqrt{a^2 c-b^2 c x^2}} \, dx}{f^2 \sqrt{a+b x} \sqrt{a c-b c x}}+\frac{\left (\left (C e^2-B e f+A f^2\right ) \sqrt{a^2 c-b^2 c x^2}\right ) \int \frac{1}{(e+f x) \sqrt{a^2 c-b^2 c x^2}} \, dx}{f^2 \sqrt{a+b x} \sqrt{a c-b c x}}\\ &=-\frac{C \left (a^2-b^2 x^2\right )}{b^2 f \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{\left ((C e-B f) \sqrt{a^2 c-b^2 c x^2}\right ) \operatorname{Subst}\left (\int \frac{1}{1+b^2 c x^2} \, dx,x,\frac{x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{f^2 \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{\left (\left (C e^2-B e f+A f^2\right ) \sqrt{a^2 c-b^2 c x^2}\right ) \operatorname{Subst}\left (\int \frac{1}{-b^2 c e^2+a^2 c f^2-x^2} \, dx,x,\frac{a^2 c f+b^2 c e x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{f^2 \sqrt{a+b x} \sqrt{a c-b c x}}\\ &=-\frac{C \left (a^2-b^2 x^2\right )}{b^2 f \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{(C e-B f) \sqrt{a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{b \sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x}}+\frac{\left (C e^2-B e f+A f^2\right ) \sqrt{a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac{\sqrt{c} \left (a^2 f+b^2 e x\right )}{\sqrt{b^2 e^2-a^2 f^2} \sqrt{a^2 c-b^2 c x^2}}\right )}{\sqrt{c} f^2 \sqrt{b^2 e^2-a^2 f^2} \sqrt{a+b x} \sqrt{a c-b c x}}\\ \end{align*}
Mathematica [A] time = 0.729006, size = 225, normalized size = 0.81 \[ \frac{\sqrt{a-b x} \left (\frac{2 \left (f (A f-B e)+C e^2\right ) \tan ^{-1}\left (\frac{\sqrt{a-b x} \sqrt{a f-b e}}{\sqrt{a+b x} \sqrt{-a f-b e}}\right )}{\sqrt{-a f-b e} \sqrt{a f-b e}}+\frac{2 \tan ^{-1}\left (\frac{\sqrt{a-b x}}{\sqrt{a+b x}}\right ) (a C f-b B f+b C e)}{b^2}+\frac{C f \sqrt{a+b x} \left (-\sqrt{a-b x}-\frac{2 \sqrt{a} \sin ^{-1}\left (\frac{\sqrt{a-b x}}{\sqrt{2} \sqrt{a}}\right )}{\sqrt{\frac{b x}{a}+1}}\right )}{b^2}\right )}{f^2 \sqrt{c (a-b x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0., size = 503, normalized size = 1.8 \begin{align*}{\frac{1}{{b}^{2}{f}^{3}c} \left ( -A\ln \left ( 2\,{\frac{1}{fx+e} \left ({b}^{2}cex+{a}^{2}cf+\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }f \right ) } \right ){b}^{2}c{f}^{2}\sqrt{{b}^{2}c}+B\ln \left ( 2\,{\frac{1}{fx+e} \left ({b}^{2}cex+{a}^{2}cf+\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }f \right ) } \right ){b}^{2}cef\sqrt{{b}^{2}c}+B\arctan \left ({x\sqrt{{b}^{2}c}{\frac{1}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}}} \right ){b}^{2}c{f}^{2}\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}-C\ln \left ( 2\,{\frac{1}{fx+e} \left ({b}^{2}cex+{a}^{2}cf+\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }f \right ) } \right ){b}^{2}c{e}^{2}\sqrt{{b}^{2}c}-C\arctan \left ({x\sqrt{{b}^{2}c}{\frac{1}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}}} \right ){b}^{2}cef\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}-C{f}^{2}\sqrt{{b}^{2}c}\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) } \right ) \sqrt{bx+a}\sqrt{-c \left ( bx-a \right ) }{\frac{1}{\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}}}{\frac{1}{\sqrt{{b}^{2}c}}}{\frac{1}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{A + B x + C x^{2}}{\sqrt{- c \left (- a + b x\right )} \sqrt{a + b x} \left (e + f x\right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]